//
//  RTMessageTableViewController.swift
//  Weibo
//
//  Created by Brisinga on 16/3/2.
//  Copyright © 2016年 Root. All rights reserved.
//

import UIKit

class RTMessageTableViewController: RTVisitorViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        if !isLogin {
            
            visitorView.setVisitorViewInfo("visitordiscover_image_message", message: "登录后，别人评论你的微博，发给你的消息，都会在这里收到通知")
            
            return
        }
        
        setupUI()
    }
    
    
    
    // 加载内部组件
    private func setupUI() {
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "发现群", target: self, action: "pushToDiscoverGroup")
        
        let titleView = UIButton()
        
        titleView .setTitle("哈哈", forState: .Normal)
        titleView.backgroundColor = UIColor.redColor()
        titleView.sizeToFit()
        
        navigationItem.titleView = titleView
    }

   
   @objc private func pushToDiscoverGroup() {
        
        let DiscoverGroupVC = RTDiscoverGroupViewController()
        
        navigationController?.pushViewController(DiscoverGroupVC, animated: true)
    }
}
